package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CallRecord;
import com.ruoyi.system.domain.Inspection;
import com.ruoyi.system.domain.InspectionPoint;
import com.ruoyi.system.domain.InspectionRecord;
import com.ruoyi.system.mapper.IrdmsMapper;
import com.ruoyi.system.service.IrdmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: azh
 * Created on 2025-2-25 22:39
 */
@Service
public class IrdmsServiceImpl implements IrdmsService {

    @Autowired
    private IrdmsMapper irdmsMapper;

    @Override
    public List<Inspection> queryInspection() {
        return irdmsMapper.queryInspection();
    }

    @Override
    public List<InspectionPoint> queryLineTypeByUsername(String username) {
        return irdmsMapper.queryLineTypeByUsername(username);
    }

    @Override
    public void insertInspection(InspectionPoint point) {
        irdmsMapper.insertInspection(point);
    }

    @Override
    public void insertCallRecord(CallRecord record) {
        irdmsMapper.insertCallRecord(record);
    }

    @Override
    public void insertInspectRecord(InspectionRecord record) {
        irdmsMapper.insertInspectionRecord(record);
    }

    @Override
    public void updateInspectRecord(InspectionRecord record) {
        irdmsMapper.updateInspectRecord(record);
    }

    @Override
    public List<InspectionRecord> selectByUsernameAndState(String username, int state) {
        return irdmsMapper.selectByUsernameAndState(username, state);
    }
}
